﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<WaterfrontLodge.Models.RegisterModel>" %>

<asp:Content ID="registerTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Register
</asp:Content>

<asp:Content ID="registerContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Create a New Account</h2>
    <p>
        Use the form below to create a new account. 
    </p>
    <p>
        Passwords are required to be a minimum of <%: ViewData["PasswordLength"] %> characters in length.
    </p>

    <% using (Html.BeginForm()) { %>
        <%: Html.ValidationSummary(true, "Account creation was unsuccessful. Please correct the errors and try again.") %>
        <div>
            <fieldset>
                <legend>Account Information</legend>
                
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.UserName) %>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.UserName) %>
                    <%: Html.ValidationMessageFor(m => m.UserName) %>
                </div>
                
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Email) %>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.Email) %>
                    <%: Html.ValidationMessageFor(m => m.Email) %>
                </div>
                  <div class="editor-label">
                    <%: Html.LabelFor(m => m.Password) %>
                </div>
                <div class="editor-field">
                    <%: Html.PasswordFor(m => m.Password) %>
                    <%: Html.ValidationMessageFor(m => m.Password) %>
                </div>
                
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.ConfirmPassword) %>
                </div>
                <div class="editor-field">
                    <%: Html.PasswordFor(m => m.ConfirmPassword) %>
                    <%: Html.ValidationMessageFor(m => m.ConfirmPassword) %>
                </div>
                <%--added by anna--%>
                <%--<div class="editor-label">
                    <%: Html.LabelFor(m => m.FulName) %>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.FulName) %>
                    <%: Html.ValidationMessageFor(m => m.FulName) %>
                </div>--%>
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.IDNO) %>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.IDNO) %>
                    <%: Html.ValidationMessageFor(m => m.IDNO) %>
                </div>
                
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.TelephoneNO) %>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.TelephoneNO) %>
                    <%: Html.ValidationMessageFor(m => m.TelephoneNO) %>
                </div>
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Address) %>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.Address) %>
                    <%: Html.ValidationMessageFor(m => m.Address) %>
                </div>

                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Gender) %>
                </div>
                <div class="editor-field">
                    <%: Html.RadioButtonFor(m => m.Gender, "Male", new { @checked = true }) %> <%:Html.Label("Male") %>
                    <%: Html.RadioButtonFor(m => m.Gender, "Female")%> <%:Html.Label("Female") %>
                    <%: Html.ValidationMessageFor(m => m.Gender) %>
                </div>


                <div class="editor-label">
                    <%: Html.LabelFor(m => m.Salutation) %>
                </div>
                <div class="editor-field">
                    
                    <%: Html.ListBoxFor(m => m.Salutation, (IEnumerable<SelectListItem>)(new[] { 
                                new SelectListItem() { Value = "Student", Text = "Student" }, 
                                new SelectListItem() { Value = "Teacher", Text = "Teacher" },
                                new SelectListItem() { Value = "Engineer", Text = "Engineer" },
                                new SelectListItem() { Value = "Agent", Text = "Agent" },
                                new SelectListItem() { Value = "Farmer", Text = "Farmer" },
                                new SelectListItem() { Value = "Worker", Text = "Worker" },
                                new SelectListItem() { Value = "Doctor", Text = "Doctor" },
                                new SelectListItem() { Value = "Lawer", Text = "Lawer" },
                                new SelectListItem() { Value = "Officer", Text = "Officer" },
                                new SelectListItem() { Value = "Others", Text = "Others" },
                             }))%>
                    <%: Html.ValidationMessageFor(m => m.Salutation) %>
                </div>

                <%--------%>
              
                
                <p>
                    <input type="submit" value="Register" />
                </p>
            </fieldset>
        </div>
    <% } %>
</asp:Content>
